package com.onlinemathuracrud.displaydecorator;

import org.displaytag.decorator.TableDecorator;

import com.onlinemathuracrud.model.Accomodation;


public class AccomodationDecorator  extends TableDecorator{
	
	public AccomodationDecorator() {
		super();
	}
	
	public String getEditUrl()
	{
		String ctx = this.getPageContext().getServletContext().getContextPath();
		Accomodation accomodation = (Accomodation) getCurrentRowObject();
		return "<a href=\""+ctx+"/accomodation/editaccomodation/" + accomodation.getId() + "\">EDIT</a>"; 
	}
	
	public String getDeleteUrl()
	{
		String ctx = this.getPageContext().getServletContext().getContextPath();
		Accomodation accomodation = (Accomodation) getCurrentRowObject();
		return "<a href=\""+ctx+"/accomodation/deleteaccomodation/" + accomodation.getId() + "\">DELETE</a>"; 
	}

}


